package com.examination.mlib.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import androidx.annotation.Nullable;

public class DBOpenHelper extends SQLiteOpenHelper {

    private volatile static DBOpenHelper openHelper  = null;
    public static DBOpenHelper getInstance(Context context) {
        if (openHelper == null){
            synchronized (DBOpenHelper.class){
                openHelper = new DBOpenHelper(context,"ylPatient.db",null,1);
            }
        }
        return openHelper;
    }

    private DBOpenHelper(@Nullable Context context, @Nullable String name, @Nullable SQLiteDatabase.CursorFactory factory, int version) {
        super(context, name, factory, version);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {

    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
